﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;

namespace TeamOPSchoolCup.Domain.POCO
{
  public class Region : IComparable
  {
    //Attributes of the Table
    public int RegionId { get; set; }
    public string Name { get; set; }
    public DateTime DateJoined { get; set; }
    
    //Foreign Keys
    [Column("Parent")]
    public int? ParentId { get; set; }
    public int? NSSFId { get; set; }

    //Relation to other Classes
    [ForeignKey("ParentId")]
    public virtual Region Parent { get; set; }
    public virtual List<Region> Children { get; set; }
    public virtual NSSF NSSF { get; set; }
    
	public int CompareTo(object obj) {
      return 1;
      //return this.Name.CompareTo(((Region)obj).Name);
    }
  }
}
